package com.kuang.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
//@Component 意义为： 组件 ，相当于<bean id="user" class="com.kuang.pojo.User"/>
@Component
@Scope("prototype")
public class User {
//    public String name="秦疆";

    //相当于<property name="name" value="kuangshen"/>
    @Value("kuagnshen")
    public String name;
//    @Value("kuagnshen")
    public void setName(String name) {
        this.name = name;
    }
}
